package com.example.shop_front_api.service.impl;
import com.example.shop_front_api.entity.Members;
import com.example.shop_front_api.mapper.MembersMapper;
import com.example.shop_front_api.service.MembersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class MembersServiceImpl implements MembersService {

    @Autowired
    private MembersMapper membersMapper;
    @Override
    public int insertMembers(Members members) {
        return membersMapper.insertMembers(members);
    }

    @Override
    public Members getMembersByUsername(String username) {
        return membersMapper.getMembersByUsername(username);
    }

    @Override
    public int updatePassword(String username, String password) {
        return membersMapper.updatePassword(username, password);
    }

    @Override
    public int updatePayPassword(int id, String payPassword) {
        return membersMapper.updatePayPassword(id, payPassword);
    }

    @Override
    public Members getMembersById(int id) {
        return membersMapper.getMembersById(id);
    }

    @Override
    public Members getMembersByMobile(String mobile) {
        return membersMapper.getMembersByMobile(mobile);
    }

    @Override
    public int updateMobile(int id, String mobile) {
        return membersMapper.updateMobile(id, mobile);
    }
}
